package common;

import com.jfinal.config.*;
import com.jfinal.core.JFinal;
import com.jfinal.template.Engine;
import controller.MainController;

/**
 * Created by Administrator on 2018/3/23 0023.
 */
public class MainConfig extends JFinalConfig {
    @Override
    public void configConstant(Constants constants) {
        //打开JFinal的开发模式
        constants.setDevMode(true);
    }

    @Override
    public void configRoute(Routes routes) {
        //  http://127.0.0.1/  --> MainController
        routes.add("/", MainController.class);

    }

    @Override
    public void configEngine(Engine engine) {

    }

    @Override
    public void configPlugin(Plugins plugins) {

    }

    @Override
    public void configInterceptor(Interceptors interceptors) {

    }

    @Override
    public void configHandler(Handlers handlers) {

    }


    public static void main(String[] args) {
        JFinal.start("src/main/webapp", 8080, "/", 15);
    }
}
